/*    */ package tools;
/*    */ 
/*    */ import java.util.logging.FileHandler;
/*    */ import java.util.logging.Logger;
/*    */ import java.util.logging.SimpleFormatter;
/*    */ 
/*    */ public class MyLogger
/*    */ {
/*  8 */   static Logger logger = Logger.getLogger("MyLog");
/*    */ 
/* 10 */   private static MyLogger INSTANCE = null;
/*    */ 
/*    */   private static void createInstance(String fileLog) {
/* 13 */     INSTANCE = new MyLogger(fileLog);
/*    */   }
/*    */ 
/*    */   public static MyLogger getInstance(String fileLog) {
/* 17 */     if (INSTANCE == null) createInstance(fileLog);
/* 18 */     return INSTANCE;
/*    */   }
/*    */ 
/*    */   private MyLogger(String filelog)
/*    */   {
/*    */     try
/*    */     {
/* 25 */       String path = Tools.readprops("path_log", ".\\");
/*    */ 
/* 28 */       int limit = 1024;
/* 29 */       FileHandler fh = new FileHandler(path + filelog, limit, 1, true);
/* 30 */       logger.addHandler(fh);
/*    */ 
/* 32 */       SimpleFormatter formatter = new SimpleFormatter();
/* 33 */       fh.setFormatter(formatter);
/*    */ 
/* 36 */       logger.info("starting logger...");
/*    */     }
/*    */     catch (Exception ex) {
/*    */     }
/*    */   }
/*    */ 
/*    */   public static void info(String msg) {
/* 43 */     logger.info(msg);
/*    */   }
/*    */ }

/* Location:           F:\BCA.jar
 * Qualified Name:     tools.MyLogger
 * JD-Core Version:    0.6.0
 */